package com.knowledge.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.knowledge.common.annotation.Excel;
import com.knowledge.common.core.domain.BaseEntity;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 知识库分类对象 knowledge_type
 *
 * @author zhaoyk
 * @date 2025-09-13
 */
@Data
@TableName(value = "knowledge_type")
@EqualsAndHashCode(callSuper = true)
public class KnowledgeType extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    /**
     * "分类名称"
     */
    @Excel(name = "分类名称")
    @NotBlank(message = "数据集名称不能为空")
    @Size(min = 0, max = 50, message = "数据集名称长度不能超过50个字符")
    private String typeName;
    /**
     * "标签"
     */
    @Excel(name = "标签")
    @Size(min = 0, max = 200, message = "标签长度不能超过200个字符")
    private String label;
    /**
     * "显示顺序"
     */
    @Excel(name = "显示顺序")
    private Long orderNum;
    /**
     * "分类状态"
     */
    @Excel(name = "分类状态", readConverterExp = "0=正常,1=停用")
    private String status;
    private String delFlag;
    /**
     * "用户Id"
     */
    @Excel(name = "用户Id")
    private String userId;


    /**
     * "文档数量"
     */
    @TableField(exist = false)
    private long documentNum;

    /**
     * "用户昵称"
     */
    @TableField(exist = false)
    private String nickName;


    /**
     * "行业类型"
     */
    @Excel(name = "行业类型")
    @TableField(exist = false)
    private String hyLx;

    @TableField(exist = false)
    private List<String> ids;

    @TableField(exist = false)
    private String idStr;


}
